#ifndef __DISSOLVED_OXYGEN_SENSOR__
#define __DISSOLVED_OXYGEN_SENSOR__
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <unistd.h>
#include <wiringSerial.h>

#define DOS_Type 1

typedef void (*DOS_cb)(float odsValue,float tempValue, int datalen, int type);

void DOS_init(DOS_cb RecvData_Cb, int time, char *uartPort, int baud);
void *DOS_Thread(DOS_cb RecvData_Cb);
int DOS_DataHandle(unsigned short crc, DOS_cb RecvData_Cb);
int Open_DOS();
unsigned short CRC16_2(unsigned short crc, unsigned char *buf, int len);
unsigned short bswap_16(unsigned short x);

int RemoveInit();

void RecvDataUart(char *SendBuff, int *SendLen, int Type);
void SendDataUart(char *SendBuff, int SendLen, int Type);
#endif